int main(int argc, char **argv) {
   double local, pi_llc = 0.0, w;
   long i, N = 1000000;
   w = 1.0 / N;
   #pragma omp target device(mpi)
   #pragma omp parallel private(i, local) {
      #pragma omp for reduction (+: pi_llc)
      for (i = 0; i < N; i++) {
         local = (i + 0.5) * w;
         pi_llc = pi_llc + 4.0/(1.0 + local * local);
      }
   }
   pi_llc *= w;
   printf("PI %f\n", pi_llc);
   return 0;
}
